package com.ruoyi.thgd.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.thgd.mapper.ThgdZdMapper;
import com.ruoyi.thgd.domain.ThgdZd;
import com.ruoyi.thgd.service.IThgdZdService;

/**
 * zdInfoService业务层处理
 * 
 * @author chenhs
 * @date 2024-09-30
 */
@Service
public class ThgdZdServiceImpl implements IThgdZdService 
{
    @Autowired
    private ThgdZdMapper thgdZdMapper;

    /**
     * 查询zdInfo
     * 
     * @param id zdInfo主键
     * @return zdInfo
     */
    @Override
    public ThgdZd selectThgdZdById(Long id)
    {
        return thgdZdMapper.selectThgdZdById(id);
    }

    /**
     * 查询zdInfo列表
     * 
     * @param thgdZd zdInfo
     * @return zdInfo
     */
    @Override
    public List<ThgdZd> selectThgdZdList(ThgdZd thgdZd)
    {
        return thgdZdMapper.selectThgdZdList(thgdZd);
    }

    /**
     * 新增zdInfo
     * 
     * @param thgdZd zdInfo
     * @return 结果
     */
    @Override
    public int insertThgdZd(ThgdZd thgdZd)
    {
        thgdZd.setCreateTime(DateUtils.getNowDate());
        return thgdZdMapper.insertThgdZd(thgdZd);
    }

    /**
     * 修改zdInfo
     * 
     * @param thgdZd zdInfo
     * @return 结果
     */
    @Override
    public int updateThgdZd(ThgdZd thgdZd)
    {
        thgdZd.setUpdateTime(DateUtils.getNowDate());
        return thgdZdMapper.updateThgdZd(thgdZd);
    }

    /**
     * 批量删除zdInfo
     * 
     * @param ids 需要删除的zdInfo主键
     * @return 结果
     */
    @Override
    public int deleteThgdZdByIds(Long[] ids)
    {
        return thgdZdMapper.deleteThgdZdByIds(ids);
    }

    /**
     * 删除zdInfo信息
     * 
     * @param id zdInfo主键
     * @return 结果
     */
    @Override
    public int deleteThgdZdById(Long id)
    {
        return thgdZdMapper.deleteThgdZdById(id);
    }
}
